1 Loading in Data sets + Library packages.

## 
## The downloaded binary packages are in
##  /var/folders/7n/x74qctp91rng390gx0z9hmd80000gn/T//RtmpT18jmQ/downloaded_packages
## 
## The downloaded binary packages are in
##  /var/folders/7n/x74qctp91rng390gx0z9hmd80000gn/T//RtmpT18jmQ/downloaded_packages
## 
## The downloaded binary packages are in
##  /var/folders/7n/x74qctp91rng390gx0z9hmd80000gn/T//RtmpT18jmQ/downloaded_packages
options(future.globals.maxSize = 74 * 1024^3) # 55 GB
getOption("future.globals.maxSize") #59055800320
## [1] 79456894976
load(here("jk_code", "SO4analysis.rds"))

2 Average expression

# avg expression in every cluster
avg_exp <- AverageExpression(SO4)$RNA
## As of Seurat v5, we recommend using AggregateExpression to perform pseudo-bulk analysis.
## Names of identity class contain underscores ('_'), replacing with dashes ('-')
## This message is displayed once per session.
## Warning in PseudobulkExpression.Assay(object = object[[assays[i]]], assay =
## assays[i], : Exponentiation yielded infinite values. `data` may not be
## log-normed.
# Calculate row means (average across all clusters)
gene_means <- rowMeans(avg_exp)

# Order genes by mean expression, descending
top_genes <- names(sort(gene_means, decreasing = TRUE))[1:50] # Top 50 genes

2.1 Grabbing dataframe

type_markers <- FindAllMarkers(SO4, only.pos = TRUE)
## Calculating cluster type_1
## Warning: The `slot` argument of `GetAssayData()` is deprecated as of SeuratObject 5.0.0.
## ℹ Please use the `layer` argument instead.
## ℹ The deprecated feature was likely used in the Seurat package.
##   Please report the issue at <https://github.com/satijalab/seurat/issues>.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## Warning: `PackageCheck()` was deprecated in SeuratObject 5.0.0.
## ℹ Please use `rlang::check_installed()` instead.
## ℹ The deprecated feature was likely used in the Seurat package.
##   Please report the issue at <https://github.com/satijalab/seurat/issues>.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## For a (much!) faster implementation of the Wilcoxon Rank Sum Test,
## (default method for FindMarkers) please install the presto package
## --------------------------------------------
## install.packages('devtools')
## devtools::install_github('immunogenomics/presto')
## --------------------------------------------
## After installation of presto, Seurat will automatically use the more 
## efficient implementation (no further action necessary).
## This message will be shown once per session
## Calculating cluster type_2a
## Calculating cluster type_2b
## Calculating cluster type_2c
## Calculating cluster type_3
## Calculating cluster type_4
type_markers %>%
    group_by(cluster) %>%
    dplyr::filter(avg_log2FC > 1)
# Filter for your top genes and arrang, replace top_genes with genes I may want to analyze specifically. 
df <- type_markers %>%
  filter(gene %in% top_genes) %>%
  arrange(desc(avg_log2FC))

df2 <- df %>% filter(p_val_adj < 0.05)


DEG_list <- df2

markers <- DEG_list %>% mutate(SYMBOL = gene)


ENTREZ_list <- bitr(
  geneID = DEG_list$gene,
  fromType = "SYMBOL",
  toType = "ENTREZID",
  OrgDb = org.Mm.eg.db
)
## 'select()' returned 1:1 mapping between keys and columns
markers <-  ENTREZ_list %>% inner_join(markers, by = "SYMBOL")

# Removing genes that are not statistically significant. 
markers <-  markers %>% dplyr::filter(p_val_adj < 0.05)
#head(markers, n = 50)

pos.markers <-  markers %>% dplyr::filter(avg_log2FC > 0.5) %>%  arrange(desc(abs(avg_log2FC)))
#head(pos.markers, n = 50)

pos.ranks <- pos.markers$ENTREZID[abs(pos.markers$avg_log2FC) > 0]
#head(pos.ranks)

pos_go <- enrichGO(gene = pos.ranks,           #a vector of entrez gene id
                   OrgDb = "org.Mm.eg.db",    
                   ont = "BP",
                   readable = TRUE)              #whether mapping gene ID to gene Name

pos_go
## #
## # over-representation test
## #
## #...@organism     Mus musculus 
## #...@ontology     BP 
## #...@keytype      ENTREZID 
## #...@gene     chr [1:33] "11475" "16149" "14960" "27411" "14961" "12955" "13645" "16476" ...
## #...pvalues adjusted by 'BH' with cutoff <0.05 
## #...170 enriched terms found
## 'data.frame':    170 obs. of  12 variables:
##  $ ID            : chr  "GO:0006883" "GO:0002478" "GO:0055075" "GO:0019884" ...
##  $ Description   : chr  "intracellular sodium ion homeostasis" "antigen processing and presentation of exogenous peptide antigen" "potassium ion homeostasis" "antigen processing and presentation of exogenous antigen" ...
##  $ GeneRatio     : chr  "4/32" "4/32" "4/32" "4/32" ...
##  $ BgRatio       : chr  "28/28928" "34/28928" "35/28928" "41/28928" ...
##  $ RichFactor    : num  0.1429 0.1176 0.1143 0.0976 0.0889 ...
##  $ FoldEnrichment: num  129.1 106.4 103.3 88.2 80.4 ...
##  $ zScore        : num  22.6 20.5 20.2 18.6 17.7 ...
##  $ pvalue        : num  2.48e-08 5.59e-08 6.30e-08 1.21e-07 1.78e-07 ...
##  $ p.adjust      : num  2.30e-05 2.30e-05 2.30e-05 3.32e-05 3.68e-05 ...
##  $ qvalue        : num  1.29e-05 1.29e-05 1.29e-05 1.86e-05 2.06e-05 ...
##  $ geneID        : chr  "Umod/Atp1a1/Atp1b1/Fxyd2" "Cd74/H2-Aa/H2-Ab1/H2-K1" "Umod/Atp1a1/Atp1b1/Fxyd2" "Cd74/H2-Aa/H2-Ab1/H2-K1" ...
##  $ Count         : int  4 4 4 4 4 3 3 4 5 3 ...
## #...Citation
## G Yu. Thirteen years of clusterProfiler. The Innovation. 2024, 5(6):100722
 dotplot(pos_go) +
    ggtitle("") +
    theme_classic() + 
    theme(
        plot.title = element_text(hjust = 0.5),
        legend.position = "left",
        axis.text.y = element_text(hjust = 0, size = 10)) +
    scale_y_discrete(position = "right", 
                     labels = function(x) str_wrap(x, width = 25))  # Wrap y-axis labels to 2 lines
## Scale for y is already present.
## Adding another scale for y, which will replace the existing scale.

2.1.1 Viewing genes of top 50

pathway_type <- strsplit(pos_go$geneID, "/")

names(pathway_type) <- pos_go$Description 

pathway_type
## $`intracellular sodium ion homeostasis`
## [1] "Umod"   "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`antigen processing and presentation of exogenous peptide antigen`
## [1] "Cd74"   "H2-Aa"  "H2-Ab1" "H2-K1" 
## 
## $`potassium ion homeostasis`
## [1] "Umod"   "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`antigen processing and presentation of exogenous antigen`
## [1] "Cd74"   "H2-Aa"  "H2-Ab1" "H2-K1" 
## 
## $`sodium ion homeostasis`
## [1] "Umod"   "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`establishment or maintenance of transmembrane electrochemical gradient`
## [1] "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`intracellular potassium ion homeostasis`
## [1] "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`chaperone-mediated protein folding`
## [1] "Cd74"   "Umod"   "Hspa1a" "Hspa1b"
## 
## $`protein folding`
## [1] "Cd74"   "Cryab"  "Umod"   "Hspa1a" "Hspa1b"
## 
## $`antigen processing and presentation of exogenous peptide antigen via MHC class II`
## [1] "Cd74"   "H2-Aa"  "H2-Ab1"
## 
## $`sodium ion export across plasma membrane`
## [1] "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`protein refolding`
## [1] "Cryab"  "Hspa1a" "Hspa1b"
## 
## $`antigen processing and presentation of peptide antigen`
## [1] "Cd74"   "H2-Aa"  "H2-Ab1" "H2-K1" 
## 
## $`antigen processing and presentation of peptide antigen via MHC class II`
## [1] "Cd74"   "H2-Aa"  "H2-Ab1"
## 
## $`antigen processing and presentation of peptide or polysaccharide antigen via MHC class II`
## [1] "Cd74"   "H2-Aa"  "H2-Ab1"
## 
## $`cellular response to cadmium ion`
## [1] "Jun" "Mt1" "Mt2"
## 
## $`chaperone cofactor-dependent protein refolding`
## [1] "Cd74"   "Hspa1a" "Hspa1b"
## 
## $`negative regulation of growth`
## [1] "Cryab"  "Hspa1a" "Hspa1b" "Mt1"    "Mt2"   
## 
## $`regulation of fibroblast proliferation`
## [1] "Cd74" "Egf"  "Jun"  "Fth1"
## 
## $`'de novo' post-translational protein folding`
## [1] "Cd74"   "Hspa1a" "Hspa1b"
## 
## $`antigen processing and presentation`
## [1] "Cd74"   "H2-Aa"  "H2-Ab1" "H2-K1" 
## 
## $`'de novo' protein folding`
## [1] "Cd74"   "Hspa1a" "Hspa1b"
## 
## $`potassium ion import across plasma membrane`
## [1] "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`fibroblast proliferation`
## [1] "Cd74" "Egf"  "Jun"  "Fth1"
## 
## $`response to cadmium ion`
## [1] "Jun" "Mt1" "Mt2"
## 
## $`urea transport`
## [1] "Slc14a2" "Umod"   
## 
## $`positive regulation of monocyte differentiation`
## [1] "Cd74" "Jun" 
## 
## $`positive regulation of sodium ion export across plasma membrane`
## [1] "Atp1b1" "Fxyd2" 
## 
## $`regulation of microtubule nucleation`
## [1] "Hspa1a" "Hspa1b"
## 
## $`regulation of sodium ion export across plasma membrane`
## [1] "Atp1b1" "Fxyd2" 
## 
## $`MHC class II protein complex assembly`
## [1] "H2-Aa"  "H2-Ab1"
## 
## $`peptide antigen assembly with MHC class II protein complex`
## [1] "H2-Aa"  "H2-Ab1"
## 
## $`positive regulation of cell activation`
## [1] "Acta2"  "Cd74"   "H2-Aa"  "H2-Ab1" "Actb"  
## 
## $`potassium ion transmembrane transport`
## [1] "Cd63"   "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`stress response to metal ion`
## [1] "Mt1" "Mt2"
## 
## $`positive regulation of fibroblast proliferation`
## [1] "Cd74" "Egf"  "Jun" 
## 
## $`export across plasma membrane`
## [1] "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`protein stabilization`
## [1] "Cd74"   "Cryab"  "Hspa1b" "Atp1b1"
## 
## $`positive regulation of leukocyte differentiation`
## [1] "Cd74"  "H2-Aa" "Jun"   "Actb" 
## 
## $`positive regulation of hemopoiesis`
## [1] "Cd74"  "H2-Aa" "Jun"   "Actb" 
## 
## $`leukocyte cell-cell adhesion`
## [1] "Cd74"   "H2-Aa"  "H2-Ab1" "Umod"   "Actb"  
## 
## $`positive regulation of ERK1 and ERK2 cascade`
## [1] "Acta2" "Cd74"  "Egf"   "Jun"  
## 
## $`regulation of blood pressure`
## [1] "Acta2"  "Umod"   "Klk1"   "Atp1a1"
## 
## $`regulation of metal ion transport`
## [1] "Egf"    "Cd63"   "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`regulation of sodium ion transport`
## [1] "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`regulation of hemopoiesis`
## [1] "Cd74"   "H2-Aa"  "Jun"    "Hspa1b" "Actb"  
## 
## $`MHC protein complex assembly`
## [1] "H2-Aa"  "H2-Ab1"
## 
## $`peptide antigen assembly with MHC protein complex`
## [1] "H2-Aa"  "H2-Ab1"
## 
## $`detoxification of inorganic compound`
## [1] "Mt1" "Mt2"
## 
## $`negative regulation of peptidase activity`
## [1] "Cryab"  "Hspa1b" "Wfdc2"  "Cst3"  
## 
## $`regulation of protein-containing complex assembly`
## [1] "Cryab"  "Hspa1a" "Hspa1b" "Tmsb4x" "H3f3b" 
## 
## $`potassium ion transport`
## [1] "Cd63"   "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`response to heat`
## [1] "Cryab"  "Hspa1a" "Hspa1b"
## 
## $`cellular response to copper ion`
## [1] "Mt1" "Mt2"
## 
## $`positive regulation of ubiquitin-dependent protein catabolic process`
## [1] "Egf"    "Hspa1a" "Hspa1b"
## 
## $`positive regulation of T cell activation`
## [1] "Cd74"   "H2-Aa"  "H2-Ab1" "Actb"  
## 
## $`sodium ion transport`
## [1] "Umod"   "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`regulation of monocyte differentiation`
## [1] "Cd74" "Jun" 
## 
## $`mitochondrial electron transport, cytochrome c to oxygen`
## [1] "Cox4i1" "Cox8a" 
## 
## $`cellular response to zinc ion`
## [1] "Mt1" "Mt2"
## 
## $`positive regulation of leukocyte cell-cell adhesion`
## [1] "Cd74"   "H2-Aa"  "H2-Ab1" "Actb"  
## 
## $`regulation of mitotic spindle assembly`
## [1] "Hspa1a" "Hspa1b"
## 
## $`positive regulation of myeloid cell differentiation`
## [1] "Cd74"   "Jun"    "Hspa1b"
## 
## $`tissue migration`
## [1] "Acta2" "Jun"   "Cd63" 
## 
## $`negative regulation of hydrolase activity`
## [1] "Cryab"  "Hspa1b" "Wfdc2"  "Cst3"  
## 
## $`inorganic cation import across plasma membrane`
## [1] "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`inorganic ion import across plasma membrane`
## [1] "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`positive regulation of DNA metabolic process`
## [1] "Egf"  "Jun"  "Actb" "Cst3"
## 
## $`positive regulation of sodium ion transmembrane transport`
## [1] "Atp1b1" "Fxyd2" 
## 
## $`positive regulation of T cell differentiation`
## [1] "Cd74"  "H2-Aa" "Actb" 
## 
## $`positive regulation of proteolysis involved in protein catabolic process`
## [1] "Egf"    "Hspa1a" "Hspa1b"
## 
## $`one-carbon compound transport`
## [1] "Slc14a2" "Umod"   
## 
## $`nitric oxide mediated signal transduction`
## [1] "Mt1" "Mt2"
## 
## $`regulation of ERK1 and ERK2 cascade`
## [1] "Acta2" "Cd74"  "Egf"   "Jun"  
## 
## $`positive regulation of cell-cell adhesion`
## [1] "Cd74"   "H2-Aa"  "H2-Ab1" "Actb"  
## 
## $`microtubule polymerization or depolymerization`
## [1] "Cryab"  "Hspa1a" "Hspa1b"
## 
## $`intracellular zinc ion homeostasis`
## [1] "Mt1" "Mt2"
## 
## $`positive regulation of lymphocyte activation`
## [1] "Cd74"   "H2-Aa"  "H2-Ab1" "Actb"  
## 
## $`positive regulation of lymphocyte differentiation`
## [1] "Cd74"  "H2-Aa" "Actb" 
## 
## $`negative regulation of proteolysis`
## [1] "Cryab"  "Hspa1b" "Wfdc2"  "Cst3"  
## 
## $`positive regulation of microtubule polymerization`
## [1] "Hspa1a" "Hspa1b"
## 
## $`response to copper ion`
## [1] "Mt1" "Mt2"
## 
## $`regulation of spindle assembly`
## [1] "Hspa1a" "Hspa1b"
## 
## $`oxidative phosphorylation`
## [1] "Cox6c"  "Cox4i1" "Cox8a" 
## 
## $`ERK1 and ERK2 cascade`
## [1] "Acta2" "Cd74"  "Egf"   "Jun"  
## 
## $`regulation of protein stability`
## [1] "Cd74"   "Cryab"  "Hspa1b" "Atp1b1"
## 
## $`positive regulation of receptor internalization`
## [1] "Egf"  "Cd63"
## 
## $`regulation of leukocyte differentiation`
## [1] "Cd74"  "H2-Aa" "Jun"   "Actb" 
## 
## $`proton transmembrane transport`
## [1] "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`positive regulation of leukocyte activation`
## [1] "Cd74"   "H2-Aa"  "H2-Ab1" "Actb"  
## 
## $`microtubule nucleation`
## [1] "Hspa1a" "Hspa1b"
## 
## $`positive regulation of microtubule polymerization or depolymerization`
## [1] "Hspa1a" "Hspa1b"
## 
## $`regulation of ubiquitin-dependent protein catabolic process`
## [1] "Egf"    "Hspa1a" "Hspa1b"
## 
## $`regulation of leukocyte cell-cell adhesion`
## [1] "Cd74"   "H2-Aa"  "H2-Ab1" "Actb"  
## 
## $`regulation of T cell activation`
## [1] "Cd74"   "H2-Aa"  "H2-Ab1" "Actb"  
## 
## $`regulation of peptidase activity`
## [1] "Cryab"  "Hspa1b" "Wfdc2"  "Cst3"  
## 
## $`response to temperature stimulus`
## [1] "Cryab"  "Hspa1a" "Hspa1b"
## 
## $`regulation of sodium ion transmembrane transporter activity`
## [1] "Atp1b1" "Fxyd2" 
## 
## $`regulation of supramolecular fiber organization`
## [1] "Cryab"  "Hspa1a" "Hspa1b" "Tmsb4x"
## 
## $`monocyte differentiation`
## [1] "Cd74" "Jun" 
## 
## $`regulation of mitotic spindle organization`
## [1] "Hspa1a" "Hspa1b"
## 
## $`defense response to bacterium`
## [1] "Umod"    "Wfdc15b" "Wfdc2"   "H2-K1"  
## 
## $`sodium ion transmembrane transport`
## [1] "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`positive regulation of sodium ion transport`
## [1] "Atp1b1" "Fxyd2" 
## 
## $`regulation of spindle organization`
## [1] "Hspa1a" "Hspa1b"
## 
## $`negative regulation of cell growth`
## [1] "Cryab"  "Hspa1a" "Hspa1b"
## 
## $`response to zinc ion`
## [1] "Mt1" "Mt2"
## 
## $`positive regulation of DNA replication`
## [1] "Jun"  "Cst3"
## 
## $`regulation of actin filament-based movement`
## [1] "Acta2"  "Atp1a1"
## 
## $`regulation of T cell differentiation`
## [1] "Cd74"  "H2-Aa" "Actb" 
## 
## $`membrane repolarization`
## [1] "Atp1a1" "Atp1b1"
## 
## $`cellular response to metal ion`
## [1] "Jun" "Mt1" "Mt2"
## 
## $`aerobic respiration`
## [1] "Cox6c"  "Cox4i1" "Cox8a" 
## 
## $`regulation of transmembrane transporter activity`
## [1] "Actb"   "Atp1b1" "Fxyd2" 
## 
## $`regulation of protein polymerization`
## [1] "Hspa1a" "Hspa1b" "Tmsb4x"
## 
## $`import across plasma membrane`
## [1] "Atp1a1" "Atp1b1" "Fxyd2" 
## 
## $`regulation of transporter activity`
## [1] "Actb"   "Atp1b1" "Fxyd2" 
## 
## $`regulation of microtubule polymerization`
## [1] "Hspa1a" "Hspa1b"
## 
## $`regulation of sodium ion transmembrane transport`
## [1] "Atp1b1" "Fxyd2" 
## 
## $`sister chromatid segregation`
## [1] "Hspa1a" "Hspa1b" "Actb"  
## 
## $`positive regulation of cytokine-mediated signaling pathway`
## [1] "Cd74"   "Hspa1b"
## 
## $`positive regulation of interleukin-8 production`
## [1] "Cd74"   "Hspa1b"
## 
## $`regulation of lymphocyte differentiation`
## [1] "Cd74"  "H2-Aa" "Actb" 
## 
## $`regulation of proteolysis involved in protein catabolic process`
## [1] "Egf"    "Hspa1a" "Hspa1b"
## 
## $`regulation of myeloid cell differentiation`
## [1] "Cd74"   "Jun"    "Hspa1b"
## 
## $`positive regulation of receptor-mediated endocytosis`
## [1] "Egf"  "Cd63"
## 
## $`aerobic electron transport chain`
## [1] "Cox4i1" "Cox8a" 
## 
## $`negative regulation of cysteine-type endopeptidase activity involved in apoptotic process`
## [1] "Cryab"  "Hspa1b"
## 
## $`positive regulation of response to cytokine stimulus`
## [1] "Cd74"   "Hspa1b"
## 
## $`regulation of cardiac muscle contraction`
## [1] "Atp1a1" "Atp1b1"
## 
## $`mitotic spindle assembly`
## [1] "Hspa1a" "Hspa1b"
## 
## $`cellular respiration`
## [1] "Cox6c"  "Cox4i1" "Cox8a" 
## 
## $`positive regulation of myeloid leukocyte differentiation`
## [1] "Cd74" "Jun" 
## 
## $`regulation of interleukin-8 production`
## [1] "Cd74"   "Hspa1b"
## 
## $`regulation of epithelial cell migration`
## [1] "Jun"  "Cd63"
## 
## $`positive regulation of proteasomal ubiquitin-dependent protein catabolic process`
## [1] "Hspa1a" "Hspa1b"
## 
## $`interleukin-8 production`
## [1] "Cd74"   "Hspa1b"
## 
## $`ameboidal-type cell migration`
## [1] "Acta2" "Jun"   "Cd63" 
## 
## $`mitochondrial ATP synthesis coupled electron transport`
## [1] "Cox4i1" "Cox8a" 
## 
## $`negative regulation of cysteine-type endopeptidase activity`
## [1] "Cryab"  "Hspa1b"
## 
## $`mitotic nuclear division`
## [1] "Egf"    "Hspa1a" "Hspa1b"
## 
## $`ATP synthesis coupled electron transport`
## [1] "Cox4i1" "Cox8a" 
## 
## $`regulation of potassium ion transmembrane transport`
## [1] "Cd63"   "Atp1b1"
## 
## $`protein polymerization`
## [1] "Hspa1a" "Hspa1b" "Tmsb4x"
## 
## $`regulation of striated muscle contraction`
## [1] "Atp1a1" "Atp1b1"
## 
## $`regulation of receptor internalization`
## [1] "Egf"  "Cd63"
## 
## $`peptidyl-threonine phosphorylation`
## [1] "Egf"  "Umod"
## 
## $`microtubule polymerization`
## [1] "Hspa1a" "Hspa1b"
## 
## $`positive regulation of protein polymerization`
## [1] "Hspa1a" "Hspa1b"
## 
## $`regulation of microtubule polymerization or depolymerization`
## [1] "Hspa1a" "Hspa1b"
## 
## $`tumor necrosis factor-mediated signaling pathway`
## [1] "Umod"   "Hspa1b"
## 
## $`nuclear chromosome segregation`
## [1] "Hspa1a" "Hspa1b" "Actb"  
## 
## $`muscle contraction`
## [1] "Acta2"  "Atp1a1" "Atp1b1"
## 
## $`actin-mediated cell contraction`
## [1] "Acta2"  "Atp1a1"
## 
## $`positive regulation of endothelial cell proliferation`
## [1] "Egf" "Jun"
## 
## $`peptidyl-threonine modification`
## [1] "Egf"  "Umod"
## 
## $`positive regulation of proteolysis`
## [1] "Egf"    "Hspa1a" "Hspa1b"
## 
## $`regulation of monoatomic cation transmembrane transport`
## [1] "Cd63"   "Atp1b1" "Fxyd2" 
## 
## $`regulation of potassium ion transport`
## [1] "Cd63"   "Atp1b1"
## 
## $`cellular response to chemical stress`
## [1] "Jun"    "Atp1a1" "Cst3"  
## 
## $`epithelial cell migration`
## [1] "Jun"  "Cd63"
## 
## $`T cell differentiation`
## [1] "Cd74"  "H2-Aa" "Actb" 
## 
## $`regulation of binding`
## [1] "Egf"  "Jun"  "Actb"
## 
## $`positive regulation of proteasomal protein catabolic process`
## [1] "Hspa1a" "Hspa1b"
## 
## $`regulation of DNA binding`
## [1] "Egf" "Jun"
## 
## $`epithelium migration`
## [1] "Jun"  "Cd63"
## 
## $`regulation of endocytosis`
## [1] "Egf"  "Actb" "Cd63"
## 
## $`antibacterial humoral response`
## [1] "Wfdc15b" "Wfdc2"  
## 
## $`respiratory electron transport chain`
## [1] "Cox4i1" "Cox8a" 
## 
## $`response to unfolded protein`
## [1] "Umod"   "Hspa1a"
gyarmati <- c("Fabp3", "Egf", "Ccn1", "Foxq1", "Cxcl12", "Vash2", "Pamr1", "Vegfa", "Ccn3", "Bmp3", "Fgf9", "Spp1", "Wnt10a", "Sfrp1", "Tcf4", "Pappa2", "Unc5d", "Sema3c", "Robo2", "Slit2", "Egfl6", "Hgfac", "Pdgfc", "Megf9", "Frem1", "Thsd4", "Spock2", "Mmp14", "Adamtsl2", "Car8", "Irx1", "Irx2", "Hoxd11", "Hoxc4", "Etv1")

# Filter for your top genes and arrang, replace top_genes with genes I may want to analyze specifically. 
df <- type_markers %>%
  filter(gene %in% gyarmati) %>%
  arrange(desc(avg_log2FC))

df2 <- df %>% filter(p_val_adj < 0.05)


DEG_list <- df2

markers <- DEG_list %>% mutate(SYMBOL = gene)


ENTREZ_list <- bitr(
  geneID = DEG_list$gene,
  fromType = "SYMBOL",
  toType = "ENTREZID",
  OrgDb = org.Mm.eg.db
)
## 'select()' returned 1:1 mapping between keys and columns
markers <-  ENTREZ_list %>% inner_join(markers, by = "SYMBOL")

# Removing genes that are not statistically significant. 
markers <-  markers %>% dplyr::filter(p_val_adj < 0.05)
#head(markers, n = 50)

pos.markers <-  markers %>% dplyr::filter(avg_log2FC > 0.5) %>%  arrange(desc(abs(avg_log2FC)))
#head(pos.markers, n = 50)

pos.ranks <- pos.markers$ENTREZID[abs(pos.markers$avg_log2FC) > 0]
#head(pos.ranks)

pos_go <- enrichGO(gene = pos.ranks,           #a vector of entrez gene id
                   OrgDb = "org.Mm.eg.db",    
                   ont = "BP",
                   readable = TRUE)              #whether mapping gene ID to gene Name

pos_go
## #
## # over-representation test
## #
## #...@organism     Mus musculus 
## #...@ontology     BP 
## #...@keytype      ENTREZID 
## #...@gene     chr [1:25] "15220" "13645" "14077" "16007" "20315" "94214" "23850" ...
## #...pvalues adjusted by 'BH' with cutoff <0.05 
## #...282 enriched terms found
## 'data.frame':    282 obs. of  12 variables:
##  $ ID            : chr  "GO:0060562" "GO:0007411" "GO:0097485" "GO:0048705" ...
##  $ Description   : chr  "epithelial tube morphogenesis" "axon guidance" "neuron projection guidance" "skeletal system morphogenesis" ...
##  $ GeneRatio     : chr  "7/24" "6/24" "6/24" "6/24" ...
##  $ BgRatio       : chr  "404/28928" "258/28928" "259/28928" "269/28928" ...
##  $ RichFactor    : num  0.0173 0.0233 0.0232 0.0223 0.0289 ...
##  $ FoldEnrichment: num  20.9 28 27.9 26.9 34.8 ...
##  $ zScore        : num  11.6 12.6 12.5 12.3 12.9 ...
##  $ pvalue        : num  2.77e-08 5.59e-08 5.72e-08 7.15e-08 2.80e-07 ...
##  $ p.adjust      : num  1.67e-05 1.67e-05 1.67e-05 1.67e-05 4.88e-05 ...
##  $ qvalue        : num  7.64e-06 7.64e-06 7.64e-06 7.64e-06 2.23e-05 ...
##  $ geneID        : chr  "Egf/Cxcl12/Mmp14/Irx1/Hoxd11/Irx2/Vegfa" "Cxcl12/Unc5d/Etv1/Robo2/Megf9/Vegfa" "Cxcl12/Unc5d/Etv1/Robo2/Megf9/Vegfa" "Pappa2/Frem1/Mmp14/Hoxc4/Hoxd11/Vegfa" ...
##  $ Count         : int  7 6 6 6 5 5 5 6 4 4 ...
## #...Citation
## G Yu. Thirteen years of clusterProfiler. The Innovation. 2024, 5(6):100722
 dotplot(pos_go) +
    ggtitle("") +
    theme_classic() + 
    theme(
        plot.title = element_text(hjust = 0.5),
        legend.position = "left",
        axis.text.y = element_text(hjust = 0, size = 10)) +
    scale_y_discrete(position = "right", 
                     labels = function(x) str_wrap(x, width = 25))  # Wrap y-axis labels to 2 lines
## Scale for y is already present.
## Adding another scale for y, which will replace the existing scale.

2.1.2 Viewing gyarmati genes vvia pathway

pathway_type <- strsplit(pos_go$geneID, "/")

names(pathway_type) <- pos_go$Description 

pathway_type
## $`epithelial tube morphogenesis`
## [1] "Egf"    "Cxcl12" "Mmp14"  "Irx1"   "Hoxd11" "Irx2"   "Vegfa" 
## 
## $`axon guidance`
## [1] "Cxcl12" "Unc5d"  "Etv1"   "Robo2"  "Megf9"  "Vegfa" 
## 
## $`neuron projection guidance`
## [1] "Cxcl12" "Unc5d"  "Etv1"   "Robo2"  "Megf9"  "Vegfa" 
## 
## $`skeletal system morphogenesis`
## [1] "Pappa2" "Frem1"  "Mmp14"  "Hoxc4"  "Hoxd11" "Vegfa" 
## 
## $`kidney epithelium development`
## [1] "Robo2"  "Irx1"   "Hoxd11" "Irx2"   "Vegfa" 
## 
## $`endothelial cell proliferation`
## [1] "Egf"    "Cxcl12" "Vash2"  "Mmp14"  "Vegfa" 
## 
## $`branching morphogenesis of an epithelial tube`
## [1] "Egf"    "Cxcl12" "Mmp14"  "Hoxd11" "Vegfa" 
## 
## $`cell-substrate adhesion`
## [1] "Ccn1"   "Spock2" "Frem1"  "Egfl6"  "Mmp14"  "Vegfa" 
## 
## $`nephron tubule morphogenesis`
## [1] "Irx1"   "Hoxd11" "Irx2"   "Vegfa" 
## 
## $`nephron epithelium morphogenesis`
## [1] "Irx1"   "Hoxd11" "Irx2"   "Vegfa" 
## 
## $`nephron morphogenesis`
## [1] "Irx1"   "Hoxd11" "Irx2"   "Vegfa" 
## 
## $`renal tubule morphogenesis`
## [1] "Irx1"   "Hoxd11" "Irx2"   "Vegfa" 
## 
## $`morphogenesis of a branching epithelium`
## [1] "Egf"    "Cxcl12" "Mmp14"  "Hoxd11" "Vegfa" 
## 
## $`cartilage development`
## [1] "Ccn1"   "Ccn3"   "Bmp3"   "Hoxc4"  "Hoxd11"
## 
## $`regulation of cell-substrate adhesion`
## [1] "Ccn1"   "Spock2" "Egfl6"  "Mmp14"  "Vegfa" 
## 
## $`metanephros development`
## [1] "Robo2"  "Irx1"   "Hoxd11" "Irx2"  
## 
## $`positive regulation of endothelial cell proliferation`
## [1] "Egf"    "Cxcl12" "Vash2"  "Vegfa" 
## 
## $`morphogenesis of a branching structure`
## [1] "Egf"    "Cxcl12" "Mmp14"  "Hoxd11" "Vegfa" 
## 
## $`kidney morphogenesis`
## [1] "Irx1"   "Hoxd11" "Irx2"   "Vegfa" 
## 
## $`nephron tubule development`
## [1] "Irx1"   "Hoxd11" "Irx2"   "Vegfa" 
## 
## $`bone morphogenesis`
## [1] "Pappa2" "Frem1"  "Mmp14"  "Hoxd11"
## 
## $`renal tubule development`
## [1] "Irx1"   "Hoxd11" "Irx2"   "Vegfa" 
## 
## $`proximal/distal pattern formation`
## [1] "Irx1"   "Hoxd11" "Irx2"  
## 
## $`nephron epithelium development`
## [1] "Irx1"   "Hoxd11" "Irx2"   "Vegfa" 
## 
## $`positive regulation of cell-substrate adhesion`
## [1] "Ccn1"   "Spock2" "Egfl6"  "Vegfa" 
## 
## $`connective tissue development`
## [1] "Ccn1"   "Ccn3"   "Bmp3"   "Hoxc4"  "Hoxd11"
## 
## $`regulation of endothelial cell proliferation`
## [1] "Egf"    "Cxcl12" "Vash2"  "Vegfa" 
## 
## $`epithelial tube formation`
## [1] "Egf"   "Irx1"  "Irx2"  "Vegfa"
## 
## $`kidney development`
## [1] "Robo2"  "Irx1"   "Hoxd11" "Irx2"   "Vegfa" 
## 
## $`nephron development`
## [1] "Irx1"   "Hoxd11" "Irx2"   "Vegfa" 
## 
## $`tube formation`
## [1] "Egf"   "Irx1"  "Irx2"  "Vegfa"
## 
## $`renal system development`
## [1] "Robo2"  "Irx1"   "Hoxd11" "Irx2"   "Vegfa" 
## 
## $regionalization
## [1] "Robo2"  "Irx1"   "Hoxc4"  "Hoxd11" "Irx2"  
## 
## $`regulation of protein localization to early endosome`
## [1] "Egf"   "Vegfa"
## 
## $`positive regulation of protein localization to early endosome`
## [1] "Egf"   "Vegfa"
## 
## $`regulation of chemotaxis`
## [1] "Cxcl12" "Ccn3"   "Robo2"  "Vegfa" 
## 
## $chemotaxis
## [1] "Ccn1"   "Cxcl12" "Ccn3"   "Robo2"  "Vegfa" 
## 
## $`endothelial cell migration`
## [1] "Egf"    "Cxcl12" "Ccn3"   "Vegfa" 
## 
## $taxis
## [1] "Ccn1"   "Cxcl12" "Ccn3"   "Robo2"  "Vegfa" 
## 
## $`loop of Henle development`
## [1] "Irx1" "Irx2"
## 
## $`positive regulation of epithelial cell proliferation`
## [1] "Egf"    "Cxcl12" "Vash2"  "Vegfa" 
## 
## $`bone development`
## [1] "Pappa2" "Frem1"  "Mmp14"  "Hoxd11"
## 
## $`myeloid leukocyte migration`
## [1] "Cxcl12" "Ccn3"   "Mmp14"  "Vegfa" 
## 
## $`regulation of leukocyte migration`
## [1] "Cxcl12" "Ccn3"   "Mmp14"  "Vegfa" 
## 
## $`positive regulation of protein localization to endosome`
## [1] "Egf"   "Vegfa"
## 
## $`regulation of Notch signaling pathway`
## [1] "Ccn3"  "Robo2" "Mmp14"
## 
## $`induction of positive chemotaxis`
## [1] "Cxcl12" "Vegfa" 
## 
## $`regulation of protein localization to endosome`
## [1] "Egf"   "Vegfa"
## 
## $`positive regulation of axonogenesis`
## [1] "Cxcl12" "Robo2"  "Vegfa" 
## 
## $`regulation of animal organ morphogenesis`
## [1] "Robo2"  "Hoxd11" "Vegfa" 
## 
## $`regulation of axon extension involved in axon guidance`
## [1] "Cxcl12" "Vegfa" 
## 
## $`protein localization to early endosome`
## [1] "Egf"   "Vegfa"
## 
## $`craniofacial suture morphogenesis`
## [1] "Frem1" "Mmp14"
## 
## $`embryonic skeletal system morphogenesis`
## [1] "Mmp14"  "Hoxc4"  "Hoxd11"
## 
## $`ureteric bud development`
## [1] "Robo2"  "Hoxd11" "Vegfa" 
## 
## $`mesonephric epithelium development`
## [1] "Robo2"  "Hoxd11" "Vegfa" 
## 
## $`mesonephric tubule development`
## [1] "Robo2"  "Hoxd11" "Vegfa" 
## 
## $`mesonephros development`
## [1] "Robo2"  "Hoxd11" "Vegfa" 
## 
## $`segment specification`
## [1] "Irx1" "Irx2"
## 
## $`regulation of vasculature development`
## [1] "Cxcl12" "Vash2"  "Tcf4"   "Vegfa" 
## 
## $`axon extension involved in axon guidance`
## [1] "Cxcl12" "Vegfa" 
## 
## $`mammary gland alveolus development`
## [1] "Egf"   "Vegfa"
## 
## $`mammary gland lobule development`
## [1] "Egf"   "Vegfa"
## 
## $`neuron projection extension involved in neuron projection guidance`
## [1] "Cxcl12" "Vegfa" 
## 
## $`extracellular matrix organization`
## [1] "Ccn1"   "Spock2" "Egfl6"  "Mmp14" 
## 
## $`regulation of ERK1 and ERK2 cascade`
## [1] "Egf"    "Ccn1"   "Cxcl12" "Vegfa" 
## 
## $`external encapsulating structure organization`
## [1] "Ccn1"   "Spock2" "Egfl6"  "Mmp14" 
## 
## $`extracellular structure organization`
## [1] "Ccn1"   "Spock2" "Egfl6"  "Mmp14" 
## 
## $`retinal ganglion cell axon guidance`
## [1] "Robo2" "Vegfa"
## 
## $`nephron tubule formation`
## [1] "Irx1" "Irx2"
## 
## $`regulation of vascular endothelial growth factor signaling pathway`
## [1] "Tcf4"  "Vegfa"
## 
## $`ERK1 and ERK2 cascade`
## [1] "Egf"    "Ccn1"   "Cxcl12" "Vegfa" 
## 
## $`organ induction`
## [1] "Robo2"  "Hoxd11"
## 
## $`regulation of cellular response to vascular endothelial growth factor stimulus`
## [1] "Tcf4"  "Vegfa"
## 
## $`striated muscle cell differentiation`
## [1] "Cxcl12" "Ccn3"   "Mmp14"  "Vegfa" 
## 
## $`regulation of leukocyte chemotaxis`
## [1] "Cxcl12" "Ccn3"   "Vegfa" 
## 
## $`positive regulation of positive chemotaxis`
## [1] "Cxcl12" "Vegfa" 
## 
## $`labyrinthine layer blood vessel development`
## [1] "Ccn1"  "Vash2"
## 
## $`myotube differentiation`
## [1] "Cxcl12" "Ccn3"   "Mmp14" 
## 
## $`chondrocyte proliferation`
## [1] "Ccn3"  "Mmp14"
## 
## $`regulation of positive chemotaxis`
## [1] "Cxcl12" "Vegfa" 
## 
## $`embryonic skeletal system development`
## [1] "Mmp14"  "Hoxc4"  "Hoxd11"
## 
## $`regulation of mononuclear cell migration`
## [1] "Cxcl12" "Ccn3"   "Mmp14" 
## 
## $`endothelial cell chemotaxis`
## [1] "Ccn3"  "Vegfa"
## 
## $`regulation of animal organ formation`
## [1] "Robo2"  "Hoxd11"
## 
## $`leukocyte migration`
## [1] "Cxcl12" "Ccn3"   "Mmp14"  "Vegfa" 
## 
## $`protein localization to endosome`
## [1] "Egf"   "Vegfa"
## 
## $`positive regulation of receptor internalization`
## [1] "Egf"   "Vegfa"
## 
## $`positive regulation of cartilage development`
## [1] "Ccn1"   "Hoxd11"
## 
## $`regulation of monocyte chemotaxis`
## [1] "Cxcl12" "Ccn3"  
## 
## $`regulation of epithelial cell proliferation`
## [1] "Egf"    "Cxcl12" "Vash2"  "Vegfa" 
## 
## $`regulation of axonogenesis`
## [1] "Cxcl12" "Robo2"  "Vegfa" 
## 
## $`positive regulation of leukocyte migration`
## [1] "Cxcl12" "Mmp14"  "Vegfa" 
## 
## $`positive regulation of vasculature development`
## [1] "Cxcl12" "Vash2"  "Vegfa" 
## 
## $`regulation of cell growth`
## [1] "Cxcl12" "Ccn3"   "Mmp14"  "Vegfa" 
## 
## $`placenta blood vessel development`
## [1] "Ccn1"  "Vash2"
## 
## $`specification of animal organ identity`
## [1] "Robo2"  "Hoxd11"
## 
## $`developmental induction`
## [1] "Robo2"  "Hoxd11"
## 
## $`positive regulation of animal organ morphogenesis`
## [1] "Robo2"  "Hoxd11"
## 
## $`Notch signaling pathway`
## [1] "Ccn3"  "Robo2" "Mmp14"
## 
## $`vascular endothelial growth factor signaling pathway`
## [1] "Tcf4"  "Vegfa"
## 
## $`metanephric nephron development`
## [1] "Irx1" "Irx2"
## 
## $`positive regulation of morphogenesis of an epithelium`
## [1] "Egf"   "Vegfa"
## 
## $`branching involved in blood vessel morphogenesis`
## [1] "Cxcl12" "Vegfa" 
## 
## $`regulation of myotube differentiation`
## [1] "Ccn3"  "Mmp14"
## 
## $`positive regulation of Notch signaling pathway`
## [1] "Ccn3"  "Robo2"
## 
## $`negative regulation of chemotaxis`
## [1] "Ccn3"  "Robo2"
## 
## $`muscle cell differentiation`
## [1] "Cxcl12" "Ccn3"   "Mmp14"  "Vegfa" 
## 
## $`positive regulation of cell growth`
## [1] "Cxcl12" "Mmp14"  "Vegfa" 
## 
## $`positive regulation of phosphatidylinositol 3-kinase/protein kinase B signal transduction`
## [1] "Egf"    "Cxcl12" "Vegfa" 
## 
## $`dopaminergic neuron differentiation`
## [1] "Cxcl12" "Vegfa" 
## 
## $`monocyte chemotaxis`
## [1] "Cxcl12" "Ccn3"  
## 
## $`neuron migration`
## [1] "Cxcl12" "Unc5d"  "Vegfa" 
## 
## $`positive regulation of ERK1 and ERK2 cascade`
## [1] "Egf"    "Cxcl12" "Vegfa" 
## 
## $`mononuclear cell migration`
## [1] "Cxcl12" "Ccn3"   "Mmp14" 
## 
## $`negative regulation of leukocyte migration`
## [1] "Cxcl12" "Ccn3"  
## 
## $`positive regulation of axon extension`
## [1] "Cxcl12" "Vegfa" 
## 
## $`regulation of calcium ion import`
## [1] "Egf"    "Cxcl12"
## 
## $`cell-matrix adhesion`
## [1] "Frem1" "Mmp14" "Vegfa"
## 
## $`heart valve morphogenesis`
## [1] "Ccn1"  "Robo2"
## 
## $`osteoblast differentiation`
## [1] "Ccn1"  "Bmp3"  "Vegfa"
## 
## $`leukocyte chemotaxis`
## [1] "Cxcl12" "Ccn3"   "Vegfa" 
## 
## $`positive chemotaxis`
## [1] "Cxcl12" "Vegfa" 
## 
## $`cellular response to vascular endothelial growth factor stimulus`
## [1] "Tcf4"  "Vegfa"
## 
## $`labyrinthine layer development`
## [1] "Ccn1"  "Vash2"
## 
## $`regulation of focal adhesion assembly`
## [1] "Mmp14" "Vegfa"
## 
## $`regulation of cell-substrate junction assembly`
## [1] "Mmp14" "Vegfa"
## 
## $`positive regulation of receptor-mediated endocytosis`
## [1] "Egf"   "Vegfa"
## 
## $`response to mechanical stimulus`
## [1] "Cxcl12" "Etv1"   "Mmp14" 
## 
## $`positive regulation of ossification`
## [1] "Ccn1" "Ccn3"
## 
## $`branching involved in ureteric bud morphogenesis`
## [1] "Hoxd11" "Vegfa" 
## 
## $`heart valve development`
## [1] "Ccn1"  "Robo2"
## 
## $`regulation of cell-substrate junction organization`
## [1] "Mmp14" "Vegfa"
## 
## $`ameboidal-type cell migration`
## [1] "Cxcl12" "Ccn3"   "Vegfa" 
## 
## $`syncytium formation by plasma membrane fusion`
## [1] "Cxcl12" "Vash2" 
## 
## $`cell-cell fusion`
## [1] "Cxcl12" "Vash2" 
## 
## $`endochondral bone morphogenesis`
## [1] "Mmp14"  "Hoxd11"
## 
## $`syncytium formation`
## [1] "Cxcl12" "Vash2" 
## 
## $`positive regulation of DNA biosynthetic process`
## [1] "Egf"   "Vegfa"
## 
## $`regulation of morphogenesis of an epithelium`
## [1] "Egf"   "Vegfa"
## 
## $`animal organ formation`
## [1] "Robo2"  "Hoxd11"
## 
## $`ureteric bud morphogenesis`
## [1] "Hoxd11" "Vegfa" 
## 
## $`regulation of cartilage development`
## [1] "Ccn1"   "Hoxd11"
## 
## $`regulation of phosphatidylinositol 3-kinase/protein kinase B signal transduction`
## [1] "Egf"    "Cxcl12" "Vegfa" 
## 
## $`heart morphogenesis`
## [1] "Ccn1"  "Robo2" "Vegfa"
## 
## $`positive regulation of osteoblast differentiation`
## [1] "Ccn1"  "Vegfa"
## 
## $`ovarian follicle development`
## [1] "Mmp14" "Vegfa"
## 
## $`mesonephric tubule morphogenesis`
## [1] "Hoxd11" "Vegfa" 
## 
## $`positive regulation of neural precursor cell proliferation`
## [1] "Egf"   "Vegfa"
## 
## $`cardiac septum morphogenesis`
## [1] "Ccn1"  "Robo2"
## 
## $`regulation of angiogenesis`
## [1] "Vash2" "Tcf4"  "Vegfa"
## 
## $`cranial skeletal system development`
## [1] "Frem1" "Mmp14"
## 
## $`outflow tract morphogenesis`
## [1] "Robo2" "Vegfa"
## 
## $`focal adhesion assembly`
## [1] "Mmp14" "Vegfa"
## 
## $`positive regulation of growth`
## [1] "Cxcl12" "Mmp14"  "Vegfa" 
## 
## $`negative regulation of cell adhesion`
## [1] "Cxcl12" "Mmp14"  "Vegfa" 
## 
## $`calcium ion import`
## [1] "Egf"    "Cxcl12"
## 
## $`ventricular septum development`
## [1] "Ccn1"  "Robo2"
## 
## $`positive regulation of neurogenesis`
## [1] "Cxcl12" "Robo2"  "Vegfa" 
## 
## $`regulation of cellular response to growth factor stimulus`
## [1] "Ccn1"  "Tcf4"  "Vegfa"
## 
## $`cell chemotaxis`
## [1] "Cxcl12" "Ccn3"   "Vegfa" 
## 
## $`positive regulation of proteolysis`
## [1] "Egf"   "Ccn1"  "Mmp14"
## 
## $`phosphatidylinositol 3-kinase/protein kinase B signal transduction`
## [1] "Egf"    "Cxcl12" "Vegfa" 
## 
## $`regulation of receptor internalization`
## [1] "Egf"   "Vegfa"
## 
## $`embryonic organ morphogenesis`
## [1] "Mmp14"  "Hoxc4"  "Hoxd11"
## 
## $`cell-substrate junction assembly`
## [1] "Mmp14" "Vegfa"
## 
## $`negative regulation of locomotion`
## [1] "Cxcl12" "Ccn3"   "Robo2" 
## 
## $`regulation of axon extension`
## [1] "Cxcl12" "Vegfa" 
## 
## $`sensory perception of pain`
## [1] "Cxcl12" "Ccn3"  
## 
## $`cell-substrate junction organization`
## [1] "Mmp14" "Vegfa"
## 
## $`positive regulation of mononuclear cell migration`
## [1] "Cxcl12" "Mmp14" 
## 
## $`regulation of striated muscle cell differentiation`
## [1] "Ccn3"  "Mmp14"
## 
## $`regulation of DNA biosynthetic process`
## [1] "Egf"   "Vegfa"
## 
## $`positive regulation of endothelial cell migration`
## [1] "Egf"   "Vegfa"
## 
## $`positive regulation of leukocyte chemotaxis`
## [1] "Cxcl12" "Vegfa" 
## 
## $`positive regulation of nervous system development`
## [1] "Cxcl12" "Robo2"  "Vegfa" 
## 
## $`positive regulation of neuron differentiation`
## [1] "Cxcl12" "Tcf4"  
## 
## $segmentation
## [1] "Irx1" "Irx2"
## 
## $`embryonic placenta development`
## [1] "Ccn1"  "Vash2"
## 
## $`regulation of extent of cell growth`
## [1] "Cxcl12" "Vegfa" 
## 
## $`positive regulation of lipid biosynthetic process`
## [1] "Fabp3" "Ccn1" 
## 
## $`chondrocyte differentiation`
## [1] "Ccn3"   "Hoxd11"
## 
## $`artery development`
## [1] "Robo2" "Vegfa"
## 
## $`blood vessel endothelial cell migration`
## [1] "Cxcl12" "Vegfa" 
## 
## $`cardiac septum development`
## [1] "Ccn1"  "Robo2"
## 
## $`regulation of cell-matrix adhesion`
## [1] "Mmp14" "Vegfa"
## 
## $`axon extension`
## [1] "Cxcl12" "Vegfa" 
## 
## $`female gonad development`
## [1] "Mmp14" "Vegfa"
## 
## $`regulation of neural precursor cell proliferation`
## [1] "Egf"   "Vegfa"
## 
## $`development of primary female sexual characteristics`
## [1] "Mmp14" "Vegfa"
## 
## $`regulation of receptor-mediated endocytosis`
## [1] "Egf"   "Vegfa"
## 
## $`regulation of ossification`
## [1] "Ccn1" "Ccn3"
## 
## $`positive regulation of cell projection organization`
## [1] "Cxcl12" "Robo2"  "Vegfa" 
## 
## $`embryonic epithelial tube formation`
## [1] "Irx1" "Irx2"
## 
## $`cardiac chamber morphogenesis`
## [1] "Ccn1"  "Robo2"
## 
## $`regulation of neurogenesis`
## [1] "Cxcl12" "Robo2"  "Vegfa" 
## 
## $`cardiac ventricle development`
## [1] "Ccn1"  "Robo2"
## 
## $`regulation of lipid transport`
## [1] "Egf"   "Fabp3"
## 
## $`regulation of osteoblast differentiation`
## [1] "Ccn1"  "Vegfa"
## 
## $`receptor internalization`
## [1] "Egf"   "Vegfa"
## 
## $`regulation of cerebellar granule cell precursor proliferation`
## [1] "Egf"
## 
## $`positive regulation of dopamine secretion`
## [1] "Cxcl12"
## 
## $`chorio-allantoic fusion`
## [1] "Ccn1"
## 
## $`coronary artery morphogenesis`
## [1] "Vegfa"
## 
## $`regulation of phosphatidylcholine metabolic process`
## [1] "Fabp3"
## 
## $`positive regulation of blood vessel endothelial cell proliferation involved in sprouting angiogenesis`
## [1] "Vegfa"
## 
## $`regulation of blood-brain barrier permeability`
## [1] "Vegfa"
## 
## $`regulation of muscle cell differentiation`
## [1] "Ccn3"  "Mmp14"
## 
## $`female sex differentiation`
## [1] "Mmp14" "Vegfa"
## 
## $`positive regulation of chemotaxis`
## [1] "Cxcl12" "Vegfa" 
## 
## $`positive regulation of peptidyl-tyrosine phosphorylation`
## [1] "Egf"   "Vegfa"
## 
## $`germ cell migration`
## [1] "Cxcl12"
## 
## $`regulation of nitric oxide mediated signal transduction`
## [1] "Vegfa"
## 
## $`post-embryonic camera-type eye development`
## [1] "Vegfa"
## 
## $`astrocyte cell migration`
## [1] "Mmp14"
## 
## $`negative regulation of endothelial cell differentiation`
## [1] "Vegfa"
## 
## $`positive regulation of lipid metabolic process`
## [1] "Fabp3" "Ccn1" 
## 
## $`DNA biosynthetic process`
## [1] "Egf"   "Vegfa"
## 
## $`regulation of cysteine-type endopeptidase activity involved in apoptotic process`
## [1] "Ccn1"  "Vegfa"
## 
## $`mammary gland development`
## [1] "Egf"   "Vegfa"
## 
## $`regulation of endothelial cell migration`
## [1] "Egf"   "Vegfa"
## 
## $`endothelial cell activation`
## [1] "Tcf4"
## 
## $`primitive hemopoiesis`
## [1] "Vegfa"
## 
## $`lung vasculature development`
## [1] "Vegfa"
## 
## $`positive regulation of phospholipid biosynthetic process`
## [1] "Fabp3"
## 
## $`positive regulation of angiogenesis`
## [1] "Vash2" "Vegfa"
## 
## $`morphogenesis of embryonic epithelium`
## [1] "Irx1" "Irx2"
## 
## $`negative regulation of cellular extravasation`
## [1] "Cxcl12"
## 
## $`negative regulation of sterol transport`
## [1] "Egf"
## 
## $`negative regulation of cholesterol transport`
## [1] "Egf"
## 
## $`venous blood vessel morphogenesis`
## [1] "Vegfa"
## 
## $`embryonic skeletal joint morphogenesis`
## [1] "Hoxd11"
## 
## $`regulation of lipid localization`
## [1] "Egf"   "Fabp3"
## 
## $`mast cell chemotaxis`
## [1] "Vegfa"
## 
## $`bone trabecula formation`
## [1] "Vegfa"
## 
## $`regulation of protein kinase C signaling`
## [1] "Vegfa"
## 
## $`regulation of ceramide biosynthetic process`
## [1] "Ccn1"
## 
## $`placenta development`
## [1] "Ccn1"  "Vash2"
## 
## $`neuron projection extension`
## [1] "Cxcl12" "Vegfa" 
## 
## $`positive regulation of endocytosis`
## [1] "Egf"   "Vegfa"
## 
## $`cardiac chamber development`
## [1] "Ccn1"  "Robo2"
## 
## $`positive regulation of myotube differentiation`
## [1] "Mmp14"
## 
## $`hyaluronan biosynthetic process`
## [1] "Egf"
## 
## $`positive regulation of osteoblast proliferation`
## [1] "Ccn1"
## 
## $`glial cell-derived neurotrophic factor receptor signaling pathway`
## [1] "Mmp14"
## 
## $`commissural neuron axon guidance`
## [1] "Vegfa"
## 
## $`vascular associated smooth muscle cell development`
## [1] "Vegfa"
## 
## $`motor neuron migration`
## [1] "Vegfa"
## 
## $`positive regulation of chemokine (C-X-C motif) ligand 2 production`
## [1] "Ccn1"
## 
## $`regulation of cysteine-type endopeptidase activity`
## [1] "Ccn1"  "Vegfa"
## 
## $`smooth muscle cell proliferation`
## [1] "Ccn3"  "Vegfa"
## 
## $`cell proliferation in external granule layer`
## [1] "Egf"
## 
## $`cerebellar granule cell precursor proliferation`
## [1] "Egf"
## 
## $`negative regulation of focal adhesion assembly`
## [1] "Mmp14"
## 
## $`embryonic skeletal joint development`
## [1] "Hoxd11"
## 
## $`regulation of sphingolipid biosynthetic process`
## [1] "Ccn1"
## 
## $`negative regulation of cell-substrate junction organization`
## [1] "Mmp14"
## 
## $`negative regulation of dendritic cell apoptotic process`
## [1] "Cxcl12"
## 
## $`positive regulation of endothelial cell chemotaxis`
## [1] "Vegfa"
## 
## $`regulation of cell size`
## [1] "Cxcl12" "Vegfa" 
## 
## $`heart field specification`
## [1] "Robo2"
## 
## $`mechanosensory behavior`
## [1] "Etv1"
## 
## $`negative regulation of myotube differentiation`
## [1] "Ccn3"
## 
## $`cell proliferation in hindbrain`
## [1] "Egf"
## 
## $`phospholipid homeostasis`
## [1] "Fabp3"
## 
## $`atrial septum morphogenesis`
## [1] "Ccn1"
## 
## $`cardiac vascular smooth muscle cell differentiation`
## [1] "Vegfa"
## 
## $`epithelial cell-cell adhesion`
## [1] "Ccn3"
## 
## $`mast cell migration`
## [1] "Vegfa"
## 
## $`regulation of trophoblast cell migration`
## [1] "Vegfa"
## 
## $`regulation of blood vessel endothelial cell proliferation involved in sprouting angiogenesis`
## [1] "Vegfa"
## 
## $`positive regulation of phospholipid metabolic process`
## [1] "Fabp3"
## 
## $`regulation of cell-cell adhesion mediated by cadherin`
## [1] "Vegfa"
## 
## $`negative regulation of cell-cell adhesion`
## [1] "Cxcl12" "Vegfa" 
## 
## $`positive regulation of developmental growth`
## [1] "Cxcl12" "Vegfa" 
## 
## $`negative regulation of secretion`
## [1] "Egf"  "Ccn3"
## 
## $`negative regulation of neuron apoptotic process`
## [1] "Foxq1" "Vegfa"
## 
## $`tissue remodeling`
## [1] "Mmp14" "Vegfa"
## 
## $`positive regulation of catecholamine secretion`
## [1] "Cxcl12"
## 
## $`negative regulation of bone resorption`
## [1] "Vegfa"
## 
## $`bone trabecula morphogenesis`
## [1] "Vegfa"
## 
## $`trophoblast cell migration`
## [1] "Vegfa"
# Research -> top genes that appear in all cluster

VlnPlot(SO4, features = c("Bmp3", "Fgf9", "Spp1", "Wnt10a", "Sfrp1", "Tcf4")) 
## Warning: The `slot` argument of `FetchData()` is deprecated as of SeuratObject 5.0.0.
## ℹ Please use the `layer` argument instead.
## ℹ The deprecated feature was likely used in the Seurat package.
##   Please report the issue at <https://github.com/satijalab/seurat/issues>.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.

# accurate


# Research -> top enriched genes that show clustering according to Gyarmati
VlnPlot(SO4, features = c("Fabp3", "Egf", "Ccn1", "Foxq1", "Cxcl12", "Vash2", "Pamr1", "Vegfa", "Nov"),group.by = "subclass2_MD", ncol = 3)
## Warning: The following requested variables were not found: Nov

VlnPlot(SO4, features = c("Fabp3", "Egf", "Ccn1", "Foxq1", "Cxcl12", "Vash2", "Pamr1", "Vegfa", "Nov"), ncol = 3)
## Warning: The following requested variables were not found: Nov

gene_group <- list(
  Angiogenesis = c("Unc5d", "Vash2", "Cxcl14", "Sfrp1", "Pamr1", "Pappa2"),
  Migration_Patterning = c("Sema3c", "Robo2", "Slit2", "Bmp3", "Egfl6", "Fgf9"),
  Growth_Factors = c("Vegfd", "Hgfac", "Pdgfc", "Megf9", "Frem1", "Thsd4"),
  ECM_Remodeling = c("Spock2", "Mmp14", "Adamtsl2", "Car8"),
  Transcription_GrowthFactors = c("Irx1", "Irx2", "Wnt10a", "Hoxd11", "Hoxc4", "Etv1")
)


Angiogenesis_genes <- gene_group$Angiogenesis
Migration_Patterning_genes <- gene_group$Migration_Patterning
Growth_Factors_genes <- gene_group$Growth_Factors
ECM_Remodeling_genes <- gene_group$ECM_Remodeling
Transcription_GrowthFactors_genes <- gene_group$Transcription_GrowthFactors

VlnPlot(SO4,features = Angiogenesis_genes)

VlnPlot(SO4,features = Migration_Patterning_genes)

VlnPlot(SO4,features = Growth_Factors_genes)

VlnPlot(SO4,features = ECM_Remodeling_genes)

VlnPlot(SO4,features = Transcription_GrowthFactors_genes)